package cn.dada.dadarecipes.mall.cart.mapper;

import cn.dada.dadarecipes.mall.cart.pojo.dto.CartDeleteParam;
import cn.dada.dadarecipes.mall.cart.pojo.entity.Cart;
import cn.dada.dadarecipes.mall.cart.pojo.entity.CartProducts;
import cn.dada.dadarecipes.mall.cart.pojo.vo.CartProductVO;
import cn.dada.dadarecipes.user.shipping_address.pojo.entity.ShippingAddress;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CartMapper {


    List<CartProductVO> selectCart(Long id);
    //查询购物车信息
    Cart selectCartByUserId(Long userId);

    void addProducts(CartProducts cartProducts);
    //更新购物车商品信息
    void updateCartProducts(CartProducts cartProducts);

    void insert(Cart cart);

    void update(Cart cart);

    void deleteCartProducts(CartDeleteParam cartDeleteParam);

    void deleteCart(Long userId);
}
